package com.airlines.crewassignment.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

import com.airlines.crewassignment.entity.linkline.LinkLineEntity;

/**
 * @author xxxx
 * @date 2018年3月26日
 * @description 核心类之一，每日的机组连线
 */

 
public class LinkLine extends LinkLineEntity implements Serializable{
	private static final long serialVersionUID = 4062563052800920149L;
		
	//以下为计算属性
	private String  crewLinkLineKey;//MD5(flightDate+crewLinkLineNo)
	private Integer batchIndex ;//同一个航班连线机场，在同一天内的顺序，按照STD正序
	
	private Integer flyDuration ;//该连线飞行时间-分钟，各航段的计达-计飞之和
	private Boolean internationalFlg ;//是否是国际连线，从所有航段中计算
	
	private Integer restDuration; //休息期-分钟
	private Integer dutyDuration; //执勤期-分钟
	private Boolean nightPass; //过夜，一个连线环中的每天的最后一班的落地机场不是基地，则是过夜
	private Boolean nightFly;   //夜航标记
	private List<FlightInfo> flightInfoList = new ArrayList<>(); //该联系对应的航班信息
	private List<String> airportList = new ArrayList<>(); //该连线对应的机场列表
	private List<String> specialAirportList = new ArrayList<>(); //该连线对应的机场列表
	private List<Position> positionList = new ArrayList<>(); //该连线的号位信息
	private Integer requestPilotCount;//该连线需要几个飞行员
	
	
	//任务环信息  如果开始结束均为null，则本任务环只有一个任务
	private LinkLine lastLinkLineBaseInfo; //任务环中的上一个任务，可能为null，如果为null，则本任务为环的开始,这里
	private Set<String> lastWorkcodeSet; //上一个任务的人员，只有已经安排的排班，在非本次排班中的，才会有此数据
	//private LinkLine nextLinkLine; //任务环中的下一个任务，可能为null，如果为null，则本任务为环的结束
	
	//private LinkLineLoop linkLineLoopFact; //任务环事实实例
	private List<FlightInfo> flightInfoSameTaskLoopList = new ArrayList<>(); //该连线对应的任务环连线

	private String  taskLoopFact ; //任务环实例
	
	private String crewWorkcodes;//相关机组人员工号
	
	private Boolean badRoute;   //差航线标记
	
	private Integer restLevel; //机上休息设施等级

	public String getCrewLinkLineKey() {
		return crewLinkLineKey;
	}

	public void setCrewLinkLineKey(String crewLinkLineKey) {
		this.crewLinkLineKey = crewLinkLineKey;
	}

	public Integer getBatchIndex() {
		return batchIndex;
	}

	public void setBatchIndex(Integer batchIndex) {
		this.batchIndex = batchIndex;
	}

	public Integer getFlyDuration() {
		return flyDuration;
	}

	public void setFlyDuration(Integer flyDuration) {
		this.flyDuration = flyDuration;
	}

	public Boolean getInternationalFlg() {
		return internationalFlg;
	}

	public void setInternationalFlg(Boolean internationalFlg) {
		this.internationalFlg = internationalFlg;
	}

	public Integer getRestDuration() {
		return restDuration;
	}

	public void setRestDuration(Integer restDuration) {
		this.restDuration = restDuration;
	}

	public Integer getDutyDuration() {
		return dutyDuration;
	}

	public void setDutyDuration(Integer dutyDuration) {
		this.dutyDuration = dutyDuration;
	}

	public Boolean getNightPass() {
		return nightPass;
	}

	public void setNightPass(Boolean nightPass) {
		this.nightPass = nightPass;
	}

	public Boolean getNightFly() {
		return nightFly;
	}

	public void setNightFly(Boolean nightFly) {
		this.nightFly = nightFly;
	}

	public List<FlightInfo> getFlightInfoList() {
		return flightInfoList;
	}

	public void setFlightInfoList(List<FlightInfo> flightInfoList) {
		this.flightInfoList = flightInfoList;
	}

	public List<String> getAirportList() {
		return airportList;
	}

	public void setAirportList(List<String> airportList) {
		this.airportList = airportList;
	}

	public List<String> getSpecialAirportList() {
		return specialAirportList;
	}

	public void setSpecialAirportList(List<String> specialAirportList) {
		this.specialAirportList = specialAirportList;
	}

	public List<Position> getPositionList() {
		return positionList;
	}

	public void setPositionList(List<Position> positionList) {
		this.positionList = positionList;
	}

	public Integer getRequestPilotCount() {
		return requestPilotCount;
	}

	public void setRequestPilotCount(Integer requestPilotCount) {
		this.requestPilotCount = requestPilotCount;
	}

	public LinkLine getLastLinkLineBaseInfo() {
		return lastLinkLineBaseInfo;
	}

	public void setLastLinkLineBaseInfo(LinkLine lastLinkLineBaseInfo) {
		this.lastLinkLineBaseInfo = lastLinkLineBaseInfo;
	}

	public Set<String> getLastWorkcodeSet() {
		return lastWorkcodeSet;
	}

	public void setLastWorkcodeSet(Set<String> lastWorkcodeSet) {
		this.lastWorkcodeSet = lastWorkcodeSet;
	}

	public List<FlightInfo> getFlightInfoSameTaskLoopList() {
		return flightInfoSameTaskLoopList;
	}

	public void setFlightInfoSameTaskLoopList(List<FlightInfo> flightInfoSameTaskLoopList) {
		this.flightInfoSameTaskLoopList = flightInfoSameTaskLoopList;
	}

	public String getTaskLoopFact() {
		return taskLoopFact;
	}

	public void setTaskLoopFact(String taskLoopFact) {
		this.taskLoopFact = taskLoopFact;
	}

	public String getCrewWorkcodes() {
		return crewWorkcodes;
	}

	public void setCrewWorkcodes(String crewWorkcodes) {
		this.crewWorkcodes = crewWorkcodes;
	}

	public Boolean getBadRoute() {
		return badRoute;
	}

	public void setBadRoute(Boolean badRoute) {
		this.badRoute = badRoute;
	}

	public Integer getRestLevel() {
		return restLevel;
	}

	public void setRestLevel(Integer restLevel) {
		this.restLevel = restLevel;
	}
	
	
}
